package com.xwd.service.impl;

import com.xwd.dao.StudentDao;
import com.xwd.dao.impl.StudentDaoImpl;
import com.xwd.domain.Student;
import com.xwd.service.StudentService;

import java.util.List;

public class StudentServiceImpl  implements StudentService {

    private StudentDao dao = new StudentDaoImpl();
    @Override
    public List<Student> getAllStudent(String stuName,String stuNo,int sex,int index,int pageSize) {
        return dao.getAllStudent(stuName,stuNo,sex,index,pageSize);
    }

    @Override
    public int total(String stuName, String stuNo, int sex) {
        return dao.total(stuName,stuNo,sex);
    }

    @Override
    public int insertStu(Student student) {
        return dao.insertStu(student);
    }

    @Override
    public Student findById(int stuid) {
        return dao.findById(stuid);
    }

    @Override
    public int updateStudent(Student student) {
        return dao.updateStudent(student);
    }

    @Override
    public int deleteStudent(int stuId) {
        return dao.deleteStudent(stuId);
    }

    @Override
    public Boolean findStuNoExist(String stuNo) {
        return dao.findStuNoExist(stuNo);
    }
}
